<template>
  <div>
    <van-cell title="最新资讯" size="large" class="news newsTitle" />
    <van-cell value="内容" class="news">
      <div class="news-box" v-for="item in list" :key="item.id">
        <div class="left">
          <img :src="item.imgSrc" alt="" />
        </div>
        <div class="right">
          <p>{{item.title}}</p>
          <div>
            <span>{{item.from}}</span>
            <span>{{item.date}}</span>
          </div>
        </div>
      </div>
    </van-cell>
  </div>
</template>

<script>
export default {
  name: 'LatestNews',
  components: {},
  props: {
    list: {
      type: Array,
      required: true
    }
  },
  data () {
    return {}
  },
  watch: {},
  computed: {},
  created () {},
  mounted () {},
  methods: {}
}
</script>
<style lang="less" scoped>

.news {
  background-color: rgb(255, 255, 255);
}
.newsTitle {
  font-weight: bold;
}
.news-box {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  .left > img {
    display: block;
    width: 115px;
    margin-right: 10px;
  }
  .right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    > p {
      font-size: 16px;
      font-weight: 700;
      margin: 0;
    }
    > div {
      display: flex;
      justify-content: space-between;
      color: #999999;
      font-weight: 100px;
    }
  }
}
</style>
